Skip to content

ENG-1896 Remove legacy anchor-backed discourse node type support#1135

Merged
mdroidian merged 2 commits into
mainfrom
cursor/remove-legacy-anchor-support-a423
Jun 22, 2026
Merged

ENG-1896 Remove legacy anchor-backed discourse node type support#1135
mdroidian merged 2 commits into
mainfrom
cursor/remove-legacy-anchor-support-a423

Conversation

@mdroidian

Copy link
Copy Markdown
Member

Summary

This PR removes legacy anchor-backed discourse node type support from the canvas node type migration path, as requested in Linear issue DIS-608.

Changes

  • Removed anchor-backed discourse node creation from getDiscourseNodes():

    • Removed logic that filtered relations with anchor in their triples
    • Removed code that generated discourse nodes from these anchor-backed relations
  • Removed anchor selection logic from getDiscourseContextResults():

    • Removed the conditional branch that checked for anchor in relation triples
    • Removed anchor selection creation in the buildSelections() function
  • Preserved existing functionality:

    • Context selection behavior remains intact
    • All other discourse node types and relation handling continue to work as before

Context

Per Joel's explanation, anchor was a special keyword for choosing the block displayed as context for a given relation/edge between nodes. However, there is currently no place for this to show up in the discourse context UI, making this functionality unused and unsupported.

The removal simplifies the canvas node type migration flow without affecting any active features.

Testing

  • ✅ TypeScript type checking passes (pnpm run check-types)
  • ✅ ESLint linting passes (pnpm run lint)
  • ✅ Verified no remaining anchor references in discourse-related code
  • ✅ Code compiles successfully

Related Issue

Closes DIS-608

Linear Issue: ENG-1896

Open in Web Open in Cursor 

- Remove anchor-backed discourse node creation from getDiscourseNodes
- Remove anchor selection logic from getDiscourseContextResults
- Preserve existing context selection behavior

This removes unused legacy functionality where relations with 'anchor' in their triples would generate discourse nodes. Per the issue, this feature is no longer used and has no place to surface in the current discourse context UI.
@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
discourse-graph Skipped Skipped Jun 22, 2026 5:13am

Request Review

@supabase

supabase Bot commented Jun 19, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project zytfjzqyijgagqxrzbmz because there are no changes detected in packages/database/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@mdroidian mdroidian changed the title Remove legacy anchor-backed discourse node type support ENG-1896 Remove legacy anchor-backed discourse node type support Jun 22, 2026
@linear-code

linear-code Bot commented Jun 22, 2026

Copy link
Copy Markdown

ENG-1896

@mdroidian mdroidian marked this pull request as ready for review June 22, 2026 00:00
@mdroidian

Copy link
Copy Markdown
Member Author

@codex review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

Open in Devin Review

Comment thread apps/roam/src/utils/getDiscourseNodes.ts
Comment thread apps/roam/src/utils/getDiscourseNodes.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4914088315

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/roam/src/utils/getDiscourseContextResults.ts
@graphite-app

graphite-app Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

PR size/scope check

This PR is over our review-size guideline.

  • Recommended: ~200 lines changed
  • Acceptable limit: up to 400 lines when well-scoped/self-contained
  • Preferred file count: fewer than 5 files

Please split this into smaller PRs unless there is a clear reason the changes need to land together.

If keeping it as one PR, please add a brief justification covering:

  • What single problem this PR solves
  • Why the files/changes are coupled

- Updated getDiscourseNodes to only accept settingsSnapshot, removing the relations parameter.
- Adjusted multiple components and utility functions to align with the new getDiscourseNodes signature.
- Ensured consistent behavior across the application by standardizing how discourse nodes are retrieved.
@mdroidian

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 62de57d3b6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mdroidian mdroidian merged commit c8e7280 into main Jun 22, 2026
10 checks passed
@mdroidian mdroidian deleted the cursor/remove-legacy-anchor-support-a423 branch June 22, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants